import React, {Component} from 'react';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';

import routes from '../routes';
import Menu from './menu';

class App extends Component {

    componentWillMount() {
        // console.log('replace', +new Date());
        // this.props.history.replace('/a/a11');
    }

    componentDidMount() {
    }

    render() {
      console.log(this.props.shopName);
        return (
            <div id="wrapper">
                <Menu location={this.props.location} history={this.props.history} />
                {routes}
            </div>
        )
    }

}

const mapStateToProps = (state) => {
    return {
      shopName: state.shopName,
      shopIds : state.shopIds
    }
};

export default connect(mapStateToProps)(App);
